package com.gwz.sys.utils;

import java.util.UUID;

import org.apache.shiro.crypto.hash.Md5Hash;

public class MD5Utils {
	
	public static String createSalt() {
		return UUID.randomUUID().toString().replace("-", "").toUpperCase();
	}
	
	public static String md5(String source,String salt,Integer hashIterations) {
		Md5Hash md5Hash = new Md5Hash(source, salt, hashIterations);
		return md5Hash.toString();
	}
}
